﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace sentry
{
    public static class App
    {
        private static string _taskDir = null;
        public static string TaskDir
        {
            get
            {
                if (string.IsNullOrEmpty(_taskDir))
                {
                    string dir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
                    _taskDir = Path.Combine(dir, ".sentry");
                    if (!Directory.Exists(_taskDir))
                    {
                        Directory.CreateDirectory(_taskDir);
                    }
                }
                return _taskDir;
            }
        }

        public static ServiceProvider Services { get; set; }
    }
}
